<?php

use swap\visitor;
use swap\tpl_rendor;
use swap\controller;

class module_filter extends swap\before_filter {

	public static function run($context) {
		$target = visitor::get_target();
		if ($target->has_module()) {
			$module_name = $target->get_module_name();
			tpl_rendor::set_page_skeleton($context[$module_name]['skeleton']);
			controller::set_title($context[$module_name]['title']);
		}
		
	}

}
